﻿using Abp.AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AVIS.OutBound.WizardAgent
{
    /// <summary>
    /// Wizard预订的信息
    /// </summary>
    public class OrderQueryResponse : ResponseBase<OrderQueryDto>
    {
        public override string ResponseName { get { return "查询车组结果"; } }
    }

    public class OrderQueryDto
    {
        /// <summary>
        /// 订单号，由Wizard接口返回
        /// </summary>
        public string OrderNo { get; set; }

        /// <summary>
        /// 订单金额
        /// </summary>
        public double QuotedTMI { get; set; }

        /// <summary>
        /// 货币单位
        /// </summary>
        public string CurrencyCode { get; set; }

        /// <summary>
        /// 租赁价格（人民币：元）
        /// </summary>
        public double CNAmount { get; set; }

        /// <summary>
        /// 客户的姓
        /// </summary>
        public string Surname { get; set; }

        /// <summary>
        /// 客户的名
        /// </summary>
        public string Firstname { get; set; }

        /// <summary>
        /// 取车时间
        /// </summary>
        public DateTime PickupDateTime { get; set; }

        /// <summary>
        /// 取车门店编号
        /// </summary>
        public string PickUpStoreCode { get; set; }

        /// <summary>
        /// 还车时间
        /// </summary>
        public DateTime ReturnDateTime { get; set; }

        /// <summary>
        /// 还车门店编号
        /// </summary>
        public string ReturnStoreCode { get; set; }

        /// <summary>
        /// 预订车组的唯一码
        /// </summary>
        public string SIPPCode { get; set; }

        /// <summary>
        /// 套餐价格代码
        /// </summary>
        public string RateCode { get; set; }

        /// <summary>
        /// Avis全球折扣号
        /// </summary>
        public string AWD { get; set; }

        /// <summary>
        /// 银行卡账号（如果有银行卡号，则表明已经支付）
        /// </summary>
        public string MaskedCardNumber { get; set; }

        /// <summary>
        /// 银行卡类型，如果是已支付，应该为：AV
        /// </summary>
        public string CardType { get; set; }

        /// <summary>
        /// 是否为已支付订单
        /// </summary>
        public bool IsPaid
        {
            get
            {
                return !string.IsNullOrWhiteSpace(MaskedCardNumber) && CardType == "AV";
            }
        }

        /// <summary>
        /// 优惠券减免金额
        /// </summary>
        public double CouponDiscountAmount { get; set; }

        /// <summary>
        /// 优惠券减免金额的币种
        /// </summary>
        public string CouponDiscountCurrencyCode { get; set; }

        /// <summary>
        /// 车组信息
        /// </summary>
        public CarGroupDto CarGroup { get; set; }

        public OrderQueryDto()
        {
            CarGroup = new CarGroupDto();
        }
    }
}
